<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button id="text">测试按钮</button>
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="UTF-8"></script>
		<script src="../layer/layer.js" type="text/javascript" charset="UTF-8"></script>
		<script type="text/javascript">
			$('#text').on('click', function(){
				// layer.alert(
				// 	'这是一个警告',
				// 	{icon : 2},
				// 	function(index){
				// 		console.log('alert');
				// 		layer.close(index);
				// 	}
				// );
				layer.confirm(
					'确定要删除吗？',
					{icon : 3, title : '提示'},
					function(index){
						console.log('confirm');
						layer.close(index);
					}
				);
			});
		</script>
	</body>
</html>
